package com.qfedu.demo.web;

import com.qfedu.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

//@Component
@Controller //在这层可以取代@Component
public class UserController {
    @Autowired
    @Qualifier("userServiceNormal")  //解决自动装配歧义性
    private UserService userService;
    public void add(){
        userService.add();
    }

}
